﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace BTS6000
{
    public partial class frmBarcodeInput : Form
    {
        frmMain MDI;
        public frmBarcodeInput(frmMain mdi)
        {
            InitializeComponent();
            MDI = mdi;
        }

        private void frmBarcodeInput_Load(object sender, EventArgs e)
        {
            this.Icon = Properties.Resources.Tools;
        }

        private void txtBarcode_KeyPress(object sender, KeyPressEventArgs e)
        {
            if((int)e.KeyChar == 13)
            {
                MDI.Barcode.Clear();
                MDI.Barcode.Append(txtBarcode.Text);
                this.DialogResult = DialogResult.OK;
            }
        }
    }
}
